package com.hjq.mallcart.service;

import com.hjq.mallcart.entity.Cart;
import com.hjq.mallcart.entity.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @auther HJQ
 */
public interface CartService {
    CartItem addItem(Long skuId, Integer number) throws ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    Cart getAllCart() throws ExecutionException, InterruptedException;

    void checkItem(Long skuId, Integer checked);

    void changeCount(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getCurrentUserCart(Long memberId);
}
